home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
comm
/
tcp
/
cp4_2_1.lha
/
cp4_NOTREG
/
bin
/
postnews
< prev
next >
Wrap
Text File
|
1995-04-08
|
1KB
|
53 lines
/*
** Postnews Replacement Script
** GRn Can Now Post News :-)
*/
Parse arg result
a = 0
art = word(result,1)
art2 = word(result,3)
alreadyinsertedfile = "FALSE"
if art2 ~="" then
do
call open(file,art,"A")
call seek(file,0,"B")
do while ~eof(file)
a = a + 1
line.a = readln(file)
say line.a
if upper(word(line.a,1)) == "FROM:" then a = a - 1
if upper(word(line.a,1)) == "SUBJECT:" then
do
Subject = delword(line.a,1,1)
say subject
a = a -1
end
if alreadyinsertedfile == "FALSE" then call insertfile2()
end
call close(file)
art = "t:grn-file"
call open(file,art,"W")
call seek(file,0,"B")
do i = 1 to a
call writeln(file,line.i)
end
call close(file)
end
if a == 0 then address command "amitcp:bin/sendmail <" art "-f $USER -t mail2news@$NEWSSERVER"
if a ~== 0 then address command "amitcp:bin/sendmail <" art "-f $user -t mail2news@$newsserver -s "subject
exit
insertfile2:
say "insertfile4real"
call open(file2,art2,"R")
do while ~eof(file2)
a = a + 1
line.a = readln(file2)
if word(line.a,1) == "X-NewsSoftware:" then line.a = "X-NewsSoftware: GRn 2.1 19/2/94 (PostNews Fix 31/3/95 Martin Hunt)"
end
alreadyinsertedfile = "TRUE"
call close(file2)
RETURN